how to make a currency converter in javascript